<include file="Layout/header" />
<body>
<div class="breadcrumbs" id="breadcrumbs"> 
  <script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>
  <ul class="breadcrumb">
    <li> <i class="icon-home home-icon"></i> <a href="{:U('Admin/Index/welcome')}">首页</a> </li>
    <li class="active">下注管理</li>
  </ul>
</div>
<div class="page-content">
  <div class="page-header">
    <h1> 彩票管理 <small> <i class="icon-double-angle-right"></i> 下注管理 </small> </h1>
  </div>
  <div class="">
    <div class="tabbable">
      <ul class="nav nav-tabs" id="myTab">
        <foreach name="lottry_array" item="val" key="key">
           <li>
              <if condition="$key eq $c_id">
             <a class="btn btn-primary" href="{:U('Admin/Lottryodds/lottery_order',array('c_id'=>$key))}">{$val.text}</a>
              <else />
              <a class="btn btn-info" href="{:U('Admin/Lottryodds/lottery_order',array('c_id'=>$key))}">{$val.text}</a>
               </if>
          </li>
         </foreach>
      </ul>
      <div class="tab-content">
        <div class="table-responsive dataTables_wrapper"> 
          <!-- <include file="Layout/{$tpl}" />-->
           <form method="get" action="{:U('Admin/Lottryodds/lottery_order')}/c_id/{$c_id}">
      <table class="table table-striped table-bordered table-hover table-condensed">
        <tr>
           <td width="15%"><input class="col-xs-12 col-sm-8" type="text" name="member_name" value="<?php echo $_GET['member_name']?>"placeholder="会员名称"></td>
           <td width="15%"><input class="col-xs-12 col-sm-8" type="text" name="order_sn" placeholder="订单号" value="<?php echo $_GET['order_sn']?>"></td>
          <th width="10%"> <select class="input-medium"  name="status">
              <option value="0">状态</option>
               
                <option value="2" <?php if($_GET['status']=='2'){?>  selected = "selected"  <?php } ?>>未结算</option>
                <option value="1" <?php if($_GET['status']=='1'){?>  selected = "selected"  <?php } ?>>已结算</option>
                <option value="10" <?php if($_GET['status']=='10'){?>  selected = "selected"  <?php } ?>>无效</option>
            </select>
          </th>
          
          <th width="30%"> 
            <div class="col-xs-3">
              <div class="input-group input-group-sm">
                <input id="datepicker" class="form-control hasDatepicker" name="strtime" type="text" value="<?php echo $_GET['strtime'];?>">
                <span class="input-group-addon"> <i class="icon-calendar"></i> </span> </div>
             </div>
             <div class="col-xs-1" style="padding: 5px 18px;">至</div>
             <div class="col-xs-3">
              <div class="input-group input-group-sm">
                <input id="datepicker1" class="form-control hasDatepicker" name="endtime" type="text" value="<?php echo $_GET['endtime'];?>">
                <span class="input-group-addon"> <i class="icon-calendar"></i> </span> </div>
             </div> 
           
          </th>
          <td width="20%"><input class="btn btn-success" type="submit" value="搜索"></td>
        </tr>
      </table>
    </form>
             
            <table class="table table-center table-striped table-bordered table-hover dataTable">
              <thead>
                <tr>
                  <th>订单号</th>
                  <th>彩票期号</th>
                  <th>盘口</th>
                  <th>开奖结果</th>
                 
                  <th>投注玩法</th>
                  <th>投注内容</th>
                  <th>投注金额</th>
                  <th>赔率</th>
                  <th>投注时间</th>
                  <th>投注账号</th>
                  <th>状态</th>
                  <th>操作</th>
                 </tr>
              </thead>
              <tbody>
              <foreach name="order.data" item="v" key="k">
                <tr>
                  <td>{$v.order_sn}</td>
                  <td>{$v.c_no}</td>
                  <td>{$v.pan}</td>
                  <td><?php if($v['is_winning']==1){?><span style="color:red">赢</span><?php }elseif($v['is_winning']==2){?>输<?php }elseif($v['is_winning']==3){?><span style="color:blue">和</span><?php }else{?>未结算<?php }?></td>
                  <td>{$v.w_name}</td>
                  <td>{$v.content}</td>
                  <td>{$v.money}</td>
                  <td>{$v.odds}</td>
                  <td><?php echo date('Y-m-d H:i:s',$v['add_time']);?></td>
                  <td>{$v.member_name}</td>
                  <td><?php if($v['status']==1){?><span style="color:red">结算</span><?php }elseif($v['status']==10){?>无效<?php }else{?>未结算<?php }?></td>
                  <td><?php if($v['status']==0){?><a href="/index.php/Lottryodds/order_back/oid/<?php echo $v['order_sn']?>/c_id/<?php echo $v['c_id']?>">退款</a><?php }?></td>
                 </tr>
               </foreach>  
              </tbody>
            </table>
             
       
        </div>
        
        <!-- /.table-responsive --> 
      </div>
    </div>
  </div>
  <!-- /.table-responsive --> 
</div>
<div >{$order.page}</div>
</div>
</div>
<include file="Layout/js"/> 
<script src="__ADMIN_JS__/bootbox.js"></script>
<link href="__ADMIN_CSS__/datepicker.css" rel="stylesheet" />
<script src="__ADMIN_JS__/date-time/bootstrap-datepicker.min.js"></script>
<script type="text/javascript">
			jQuery(function($) {
				$("#datepicker").datepicker({
					showOtherMonths: true,
					selectOtherMonths: false,
					 
				});
				 
				$("#datepicker1").datepicker({
					showOtherMonths: true,
					selectOtherMonths: false,
					 
				}); 
				
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
  				
			})
 		</script> 
</body>
</html>